import { Item } from 'ant-design-vue/lib/menu';
import Mock from 'mockjs'
import { param2Obj } from '../../utils/decompose'
interface HomeList {
    id: string,
    key: string;
    name: number,
    block: any,
    type: string,
    XinKainame: string,
    save: string,
    score: string,
    Vipstate: any,
    over: string,
}
let List: HomeList[] = []
for (let i = 0; i < 10; i++) {
    let id = Mock.mock('@guid')
    var index = List.length + 1
    List.push({
        id: id,
        key: id,
        name: index,
        block: Mock.mock('@integer(0, 1)'),
        type: Mock.mock(/^\d+$/),
        XinKainame: Mock.mock(/^(?:[\u4e00-\u9fa5·]{2,16})$/),
        save: Mock.mock('@integer(0, 5)'),
        score: Mock.mock('@integer(0, 5)'),
        Vipstate: Mock.mock('@integer(0, 1)'),
        over: Mock.mock('@date("yyyy-MM-dd")'),
    })
}
export default {
    HomeList: (config: any) => {
        console.log(config)
        return {
            code: 200,
            msg: "数据成功了",
            data: List,
        }
    },
}